<template>
<!-- 用户成功登陆页面 -->
  <div class="AdminUser">
    <!-- 用户信息 -->
    <div class="user_top">
      <van-image
        round
        fit="cover"
        width="150px"
        height="150px"
        src="https://img01.yzcdn.cn/vant/cat.jpeg"
      />
      <!-- <h3 class="username">chenyu</h3> -->
      <h3 class="username">{{loginname}}</h3>
    </div>
    <div class="form">
      <AdminFilled v-if="filled_community"/>
      <AdminForm v-else :loginname="loginname"/>
    </div>
    <!-- 收藏和订单 -->
    <div class="love">
      <van-grid :border="false" :column-num="2">
        <van-grid-item  text="我的订单" @click="toOrder">
            <template #icon>
              <svg t="1649782284408" class="icon" viewBox="0 0 1039 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8374" width="32" height="32"><path d="M732.806026 950.719397h-462.824858c-84.851224 0-154.274953-71.352166-154.274953-156.203389v-474.395481c0-86.779661 69.423729-156.20339 154.274953-156.20339h15.427495v77.137477h-15.427495c-42.425612 0-77.137476 36.640301-77.137477 79.065913V794.516008c0 44.354049 34.711864 79.065913 77.137477 79.065913h462.824858c42.425612 0 77.137476-36.640301 77.137477-79.065913v-474.395481c0-44.354049-34.711864-79.065913-77.137477-79.065913h-42.425612v-77.137477h42.425612c84.851224 0 154.274953 71.352166 154.274953 156.20339V794.516008c0 84.851224-69.423729 156.20339-154.274953 156.203389z" fill="#388CEB" p-id="8375"></path><path d="M626.741996 312.40678h-250.696798c-57.853107 0-106.06403-42.425612-106.06403-94.493409v-48.210923c0-52.067797 48.210923-94.493409 106.06403-94.493408h250.696798c57.853107 0 106.06403 42.425612 106.06403 94.493408v48.210923c0 52.067797-48.210923 94.493409-106.06403 94.493409z m-250.696798-158.131827c-17.355932 0-28.926554 9.642185-28.926554 17.355932v48.210923c0 7.713748 11.570621 17.355932 28.926554 17.355932h250.696798c17.355932 0 28.926554-9.642185 28.926554-17.355932v-48.210923c0-7.713748-11.570621-17.355932-28.926554-17.355932h-250.696798z" fill="#388CEB" p-id="8376"></path><path d="M705.80791 482.109228H289.265537c-21.212806 0-38.568738-17.355932-38.568739-38.568738s17.355932-38.568738 38.568739-38.568739h416.542373c21.212806 0 38.568738 17.355932 38.568738 38.568739s-17.355932 38.568738-38.568738 38.568738zM705.80791 617.099812H289.265537c-21.212806 0-38.568738-17.355932-38.568739-38.568739s17.355932-38.568738 38.568739-38.568738h416.542373c21.212806 0 38.568738 17.355932 38.568738 38.568738s-17.355932 38.568738-38.568738 38.568739zM520.677966 752.090395h-231.412429c-21.212806 0-38.568738-17.355932-38.568739-38.568738s17.355932-38.568738 38.568739-38.568738h231.412429c21.212806 0 38.568738 17.355932 38.568738 38.568738s-17.355932 38.568738-38.568738 38.568738z" fill="#E78E00" p-id="8377"></path></svg>
            </template>
        </van-grid-item>
        <van-grid-item  text="我的收藏" @click="toLove">
            <template #icon>
              <svg t="1649782231890" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5464" width="32" height="32"><path d="M575.12 131l94.74 192a47.68 47.68 0 0 0 35.9 26.08l211.84 30.78c39.11 5.68 54.72 53.74 26.43 81.33l-153.3 149.39a47.68 47.68 0 0 0-13.73 42.2l36.19 211c6.68 39-34.2 68.65-69.18 50.26l-189.46-99.62a47.68 47.68 0 0 0-44.38 0L320.7 914c-35 18.39-75.86-11.31-69.18-50.26l36.19-211A47.68 47.68 0 0 0 274 610.58L120.7 461.16c-28.3-27.58-12.68-75.65 26.43-81.33L359 349.05A47.68 47.68 0 0 0 394.87 323l94.73-192c17.49-35.43 68.03-35.43 85.52 0z" fill="#FED547" p-id="5465"></path><path d="M943.3 461.77c28.3-27.58 12.68-75.65-26.43-81.33L705 349.66a47.68 47.68 0 0 1-35.9-26.08l-94.74-192c-16.31-33.05-61.35-35.25-81.53-6.65a49.51 49.51 0 0 1 4 6.65l94.74 192a47.68 47.68 0 0 0 35.9 26.08l211.84 30.78c39.11 5.68 54.72 53.74 26.43 81.33L712.47 611.19a47.68 47.68 0 0 0-13.71 42.2l36.19 211a46.76 46.76 0 0 1-11.52 39.81l19.89 10.46c35 18.39 75.86-11.31 69.18-50.26l-36.19-211A47.68 47.68 0 0 1 790 611.19z" fill="#E2B742" p-id="5466"></path><path d="M263.93 925.77a54 54 0 0 1-53.06-63.05l36.19-211A41.47 41.47 0 0 0 235.13 615L81.85 465.6a53.88 53.88 0 0 1 29.87-91.9l211.83-30.78a41.51 41.51 0 0 0 31.23-22.69l94.73-192a53.89 53.89 0 0 1 96.64 0l94.74 192a41.5 41.5 0 0 0 31.23 22.69L884 373.7a53.88 53.88 0 0 1 29.86 91.9L760.53 615a41.45 41.45 0 0 0-11.93 36.71l36.19 211a53.88 53.88 0 0 1-78.18 56.8l-189.48-99.6a41.49 41.49 0 0 0-38.6 0l-189.47 99.61a53.86 53.86 0 0 1-25.13 6.25z m233.9-815.13a40.71 40.71 0 0 0-37.19 23.12l-94.73 192a53.89 53.89 0 0 1-40.57 29.47L113.5 386a41.48 41.48 0 0 0-23 70.75l153.3 149.39a53.88 53.88 0 0 1 15.5 47.69l-36.19 211a41.48 41.48 0 0 0 60.18 43.73l189.48-99.61a53.81 53.81 0 0 1 50.15 0l189.47 99.61a41.48 41.48 0 0 0 60.18-43.73l-36.19-211a53.86 53.86 0 0 1 15.5-47.69l153.28-149.42a41.48 41.48 0 0 0-23-70.75l-211.82-30.78a53.88 53.88 0 0 1-40.57-29.47L535 133.75a40.71 40.71 0 0 0-37.17-23.12z" fill="#28CA67" p-id="5467"></path></svg>
            </template>
        </van-grid-item>
      </van-grid>

    </div>
  </div>
</template>

<script>
import AdminForm from '@/components/AdminUser/components/AdminForm.vue'
import AdminFilled from '@/components/AdminUser/components/AdminFilled.vue'
export default {
  name: 'AdminUser',
  props: {
    loginname: String,
    msg: String,
    filled_community: Boolean,
  },
  components: {
    AdminForm,
    AdminFilled
  },
  data() {
    return {
      
    };
  },
  computed: {
    areaMsg () {
      return this.$store.state.areaMsg
    }
  },
  created() {
		
  },
  mounted(){

  },
  methods:{
    toOrder(){
      // this.$route.push({ path: 'chargeStation', query: { charge_id: this.point.charge_id,lat: this.myposition.lat,lng: this.myposition.lng, distance: this.distance }})
      this.$router.push({ path: 'order'})
    },
    toLove(){
      this.$router.push({ path: 'love'})
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
  .AdminUser{
    padding: 20px;
    text-align: left;
    .user_top{
      display: flex;
      align-items: center;
      .username{
        margin-left: 25px;
        font-size: 25px;
      }
    }
    
  }
</style>